Math object methods in JavaScript